<template>
  <div class="rubbish">
    <!-- 左侧导航栏 -->
    <!-- <leftNav></leftNav> -->
    <!-- 垃圾仓实时报警 -->
    <alarm></alarm>
    <!-- 库存管理 -->
    <inventory></inventory>
    <!-- 环境监测 -->
    <environment></environment>
     <!-- 地磅监测 -->
     <wagonbalance></wagonbalance>
     <!-- 地磅监测 -->
     <temperature></temperature>
     <!-- 气体监测 -->
     <gas></gas>
  </div>
</template>

<script setup lang="ts">
import leftNav from "../components/leftNav2.vue";
import alarm from "./components/alarm.vue";
import inventory from "./components/inventory.vue";
import environment from "./components/environment.vue";
import wagonbalance from "./components/wagonbalance.vue";
import temperature from "./components/temperature.vue";
import gas from "./components/gas.vue";
import { getElementParamData } from "@/http/api_hd"


//获取当前探测结果
function RESystemSelElement() {
  console.log('144', window.BlackHole3D.Probe.getCurProbeRet());
  let newEle = window.BlackHole3D.Probe.getCurProbeRet()?.elemId || null;
  if (newEle) {
    // 请求接口
    const dataSetId = "3a14f24c-3469-a082-af16-5edffde64c55";
    let params = {
      childNodeId: newEle,
      dataSetId,
    }
    //按构件Id查询属性
    getElementParamData(params).then((res: any) => {
      console.log('160',res);
    })
  }
}

onMounted(() => {
  // document.addEventListener("RESystemSelElement", RESystemSelElement);//鼠标探测监听
  console.log('BlackHole3D',window.BlackHole3D);
  
});

onUnmounted(() => {
  // document.removeEventListener("RESystemSelElement", RESystemSelElement); //鼠标探测监听
});

</script>

<style lang="scss" scoped>
.rubbish {
}
</style>